import { ref } from 'vue'

export const useDialog = (initialVisible = false) => {
  const visible = ref(initialVisible)
  const handleOpen = () => (visible.value = true)
  const handleClose = () => (visible.value = false)
  return { visible, handleOpen, handleClose }
}
